package cn.iocoder.yudao.module.wine.controller.app.complaintype;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.wine.dal.dataobject.complaintype.ComplainTypeDO;
import cn.iocoder.yudao.module.wine.service.complaintype.ComplainTypeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "用户 APP - 投诉信息类型")
@RestController
@RequestMapping("/wine/complain-type")
@Validated
public class AppComplainTypeController {

    @Resource
    private ComplainTypeService complainTypeService;

    @GetMapping("/type-list")
    @Operation(summary = "获得投诉类型列表")
    public CommonResult<List<ComplainTypeDO>> getComplainTypeList() {
        List<ComplainTypeDO> list = complainTypeService.selectTypeList();
        return success(list);
    }


}
